package com.df.bpm.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.df.bpm.dto.BusinessInputDTO;
import com.df.bpm.mapper.BusinessInputDTOMapper;
import com.df.common.service.impl.BaseServiceImpl;
import com.df.bpm.entity.BusinessInputs;
import com.df.bpm.mapper.BusinessInputsMapper;
import com.df.bpm.service.BusinessInputsService;

import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
@RequiredArgsConstructor
public class BusinessInputsServiceImpl extends BaseServiceImpl<BusinessInputsMapper,BusinessInputs> implements BusinessInputsService {
	public final BusinessInputsMapper businessInputsMapper;
    private final BusinessInputDTOMapper businessInputDTOMapper;


    /**
     * 按业务ID查输入物清单
     * @param businessInformationIndex 业务ID
     * @return 输入物Dto
     */
    public List<BusinessInputDTO> getInputDto(Integer businessInformationIndex) {
        QueryWrapper<BusinessInputDTO> wrapper4Input=new QueryWrapper<>();
        wrapper4Input.eq("businessInformationIndex", businessInformationIndex);
        return businessInputDTOMapper.selectList(wrapper4Input);
    }
}